package com.live.video.model;

import com.live.video.enums.MsgTypeEnum;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * Description:
 * User: godd
 * Date: 2017-11-06
 * Time: 23:35
 */
@Data
@Accessors(chain = true)
public class MsgEntity {
    private String name;
    private Date time;
    private Object content;
    private String type;

    public MsgEntity() {
        this.type = MsgTypeEnum.STRING_MSG.getType();
        this.time = new Date();
    }

    public MsgEntity setType(MsgTypeEnum msgTypeEnum) {
        this.type = msgTypeEnum.getType();
        return this;
    }
}
